using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
namespace QuanLyThuoc.DAL
{
   public class NhanVienDAL:KetNoiDAL
    {
       public static DataTable SelectAll()
       {
           SqlCommand cmd = new SqlCommand("SelectAll_NhanVien", Connect());
           cmd.CommandType = CommandType.StoredProcedure;
           SqlDataAdapter da = new SqlDataAdapter(cmd);
           DataTable dt = new DataTable();
           da.Fill(dt);
           return dt;
       }
       public DataTable SelectID_NhanVien(int MaNhanVien)
       {
           SqlCommand cmd = new SqlCommand("SelectID_NhanVien", Connect());
           cmd.CommandType = CommandType.StoredProcedure;
           cmd.Parameters.AddWithValue("@IDNV", MaNhanVien);
           SqlDataAdapter da = new SqlDataAdapter(cmd);
           DataTable dt = new DataTable();
           da.Fill(dt);
           return dt;
       }
       public void InsertNhanVien(string TenNhanVien, string DiaChi, string MatKhau, string SoDT)
       {
           SqlCommand cmd = new SqlCommand("Insert_NhanVien", Connect());
           cmd.Parameters.AddWithValue("@TenNV", TenNhanVien);
           cmd.Parameters.AddWithValue("@DiaChi", DiaChi);
           cmd.Parameters.AddWithValue("@MatKhau", MatKhau);
       }
    }
}
